﻿// See https://aka.ms/new-console-template for more information

using A2;

var clock = new Clock();

// 订阅事件
clock.Tick += (sender, e) => Console.WriteLine("A Tick...");
clock.Alarm += (sender, e) => Console.WriteLine("Alarm!!!");

// 开始运行闹钟，设定闹钟时间为10秒后响铃
clock.Start(10);